<?php
/**
 * Created by PhpStorm.
 * User: user
 * Date: 2016/3/25
 * Time: 10:25
 */
use front\assets\AppAsset;
use yii\helpers\Url;

$base = AppAsset::register($this);
$baseUrl = $base->baseUrl;

$this->title = "优惠活动";



?>

<body class="u-bg1">

<div class="m-msg4">

    <h4 class="note">优惠活动</h4>
    <?php if (!empty($list)) {?>
        <?php foreach ($list as $item) {?>
        <h6><?= date('Y.m.d H:i', $item['updated_at'])?></h6>
        <dl>
            <dd class="tit"><?= $item['title']?></dd>
            <dd class="img"><img src="<?= $item['img']['img_url']?>"></dd>
            <dd><?= $item['content']?></dd>
            <dt class="J_link" data-url="<?= $item['url']?>">查看详情</dt>
        </dl>
        <?php }?>
    <?php }?>
</div>

<script>
    $(function(){

        // 链接跳转
        $('.J_link').on('tap', function(){

            window.location.href = $(this).attr('data-url');
        });
    });
</script>
</body>


























